package com.xiaodimall.backsys.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xiaodimall.backsys.mapper.CarouselMapper;
import com.xiaodimall.backsys.pojo.Carousel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author:
 * @Date: Created in 2022/12/1 15:20
 * @Description:
 */
@RestController
@RequestMapping("/admin/carousel/")
public class AdminCarouselController {
    @Resource
    CarouselMapper carouselMapper;

    @GetMapping()
    public List<Carousel> getAllCarousel(){
        return carouselMapper.selectList(new QueryWrapper<>());
    }
}
